<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/conf/config.php';

if (!$_POST['id']) {
	echo json_endoce('error');
	exit();
}

$IDS = explode(",", $_POST['id']);

$dbconn = @mysql_connect($dbhost, $dbuser, $dbpass);
@mysql_select_db($dbname, $dbconn);

foreach ($IDS as $ID) {
	$del_query = "delete from qr_members where username = '" . $ID . "' and rootuser <> 'Y'";	
	@mysql_query($del_query, $dbconn);
}

@mysql_close($dbconn);

echo json_encode('success');
?>